<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
<!-- Loading Bootstrap -->
<link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
<!-- Loading Flat UI -->
<link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
<link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
<link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
<script type="text/javascript" src="Public/uploadify/jquery-1.8.2.min.js" ></script>
</head>
<style>
	table thead th{text-align: center;}
	select{width: 80px;height: 31px;}
	input{text-indent: 10px;}
</style>
<body>	
	<form action="" method="post">					
		<table class="table table-bordered table-hover" style="text-align: center;">
			<thead>
				<tr style="background: #364150;color: white;">
				  <th width="10%" >货品ID</th>
					{{foreach from="$goodsAttryData" value="$v"}}
						<th>{{$v['trname']}}</th>
					{{endforeach}}
				  <th style="width: 13%;">库存</th>
				  <th style="width: 18%;">货号</th>
				  <th width="23%" >操作</th>
				</tr>
			</thead>
			{{foreach from="$goodsLisgtData" value="$v"}}
			<tr id="addTr">
				<td>{{$v['glid']}}</td>
				{{foreach from="$v['combine']" value="$vv"}}
					<td>{{$vv['gvalue']}}</td>
				{{endforeach}}	
				<td>{{$v['inventory']}}</td>	
				<td>{{$v['lnumber']}}</td>														
				<td>
					<a href="{{U('GoodsList/edit',array('glid'=>$v['glid']))}}" class="btn btn-warning">修改</a>									
					<a href="javascript:if(confirm('确定删除吗？'))location.href='{{U('GoodsList/del',array('glid'=>$v['glid']))}}'" class="btn btn-danger">删除</a>
				</td>
			</tr>						
			{{endforeach}}
		</table>
		
		<table class="table table-bordered table-hover">
			<tr>
				{{foreach from="$goodsAttryData" value="$v"}}
				<td>
					{{$v['trname']}}
				</td>
				<td>
					<select name="combine[]">
						<option value="0">请选择</option>
				 		{{foreach from="$v['value']" value="$vv"}}
						<option value="{{$vv['gaid']}}">{{$vv['gvalue']}}</option>
						<span class="tip"></span>
						{{endforeach}}
					</select>
				</td>
				{{endforeach}}								
        		<td>
            		<input type="text" name="inventory" id="" placeholder="库存">
        		</td>
        		<td>
            		<input type="text" name="lnumber" id="" placeholder="货号">
       			</td>
			</tr>	
			<tr>
				<td colspan="6"> 
					<button type="submit" class="btn btn-primary">添加货物清单</button>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
